<template>
  <nut-searchbar v-model="searchValue" input-background="#fff" clearable @click="jumpTo">
    <template v-slot:leftin>
      <Search2 />
    </template>
  </nut-searchbar>
</template>
<script lang="ts">
import Taro from '@tarojs/taro'
import { toRefs, reactive } from 'vue';
import { Searchbar } from '@nutui/nutui-taro';
import { Search2 } from '@nutui/icons-vue-taro';
export default {
  components: {
    'nut-searchbar': Searchbar,
    Search2
  },
  setup() {
    const state = reactive({
      searchValue: ""
    });
    const jumpTo = () => {
      Taro.navigateTo({ url: '/packageA/pages/useGoods/index' });
    }
    return {
      ...toRefs(state), jumpTo
    };
  }
};
</script>